import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart, BarChart, LineChart, MapChart, EffectScatterChart, ScatterChart } from 'echarts/charts'
import {
  TitleComponent,
  TooltipComponent,
  LegendComponent,
  GridComponent,
  GeoComponent,
  VisualMapComponent
} from 'echarts/components'

// 注册必须的组件
use([
  CanvasRenderer,
  PieChart,
  BarChart,
  LineChart,
  MapChart,
  EffectScatterChart,
  ScatterChart,
  TitleComponent,
  TooltipComponent,
  LegendComponent,
  GridComponent,
  GeoComponent,
  VisualMapComponent
])

export function registerEcharts(app) {
  // H5端可以直接使用 vue-echarts
  console.log('Echarts registered for H5 with Map support')
}

